<?php
class classTest2{
    public $a;
    public function query($value){
        $this->a=$value;
    }
    public function get(){
        return $this->a.'第二个';
    }
}
class classTest1{
    public $a;
    public function __construct($value)
    {
            $this->a=$value;
//            $this->a= new classTest2();
//               $value($this);
    }
    public function query($value){
          $this->a=$value;
    }
    public function get(){
         $this->a(111);
    }
}
$a=new classTest1(function ($a){
    echo $a;
});
$a->get();